﻿using Microsoft.Practices.Unity;
using System;
using System.Collections.Generic;
using System.Text;

namespace douban.ViewModels.Base
{
    public class ViewModelLocator
    {
        private readonly IUnityContainer _unityContainer;
        public ViewModelLocator()
        {
            _unityContainer = new UnityContainer();

            _unityContainer.RegisterType<MainVm>();
            _unityContainer.RegisterType<ExploreVm>();
        }

        public MainVm MainVm => _unityContainer.Resolve<MainVm>();
        public ExploreVm ExploreVm => _unityContainer.Resolve<ExploreVm>();
    }
}
